-- answer_add_exp
-- created by zhuangsl
-- 正确回答问题，增加特殊装备等级

return {
    apply = function(prop, baseValue)
        return prop[3];
    end,

    -- 施放技能触发触发
    trigger = function(who, prop, arg)
        local classId = tonumber(prop[2]);

        if not EquipM.canUpgradeSpecialEquip(classId) then
            return;
        end

        BonusM.doBonus({9, classId, 1}, "answer_add_exp");
    end,

    desc = function(prop)
        local row = PropM.getRow(prop[1]);
        local desc = row.desc;

        local classId = tonumber(prop[2]);

        local exp_field = EquipM.querySpecial(classId, "exp_field");
        local exp = DungeonServiceM.queryDungeonAttrib(exp_field);
        local needExp = EquipM.calcUpgradeEquipExpNeed(classId);

        desc = string.gsub(desc, "{exp}", tonumber(exp));
        desc = string.gsub(desc, "{need_exp}", tonumber(needExp));

        return desc;
    end,

    record = function(target, prop, path)
        return false;
    end
};